pkgname=yunhu
pkgver=1.6.13
pkgrel="1"
pkgdesc="oh的通讯软件"
arch=("x86_64")
url="https://app-cdn1.jwznb.com/linux/yunhu-1.6.13+188-linux.deb"
#license=("GPL3")
#默认就行
#depends=(mpv)
depends+=('mpv')
makedepends=('mpv')
source=("https://app-cdn1.jwznb.com/linux/yunhu-1.6.13+188-linux.deb")
sha512sums=("a092a6c2350876004884d9b53ac7e249de51d2ad08eb73a56abcfe171f8198e8d385814a351a6bda1086f95c69d7e03b4551f284dd8c22e19bf58a4524ffd025")
package()
{
    export LD_PRELOAD=/usr/lib/libfakeroot/libfakeroot.so
    export FAKEROOTDONTTRYCHOWN=1

    bsdtar -xf data.tar.zst -C "$pkgdir/"
    chmod 755 ${pkgdir}/
    install -dm755 ${pkgdir}/opt
    install -dm755 ${pkgdir}/usr/bin
    install -dm755 ${pkgdir}/usr/lib
    mv  ${pkgdir}/usr/share/yunhu ${pkgdir}/opt

    if [ ! -e /usr/lib/libmpv.so.1 ]; then
		ln -s /usr/lib/libmpv.so.2 "$pkgdir/usr/lib/libmpv.so.1"
	fi

# 	if [ -e /usr/bin/yunhu ];then
#         rm /bin/yunhu
# 	fi
	ln -s /opt/yunhu/yunhu ${pkgdir}/usr/bin/
	chmod -R 755 ${pkgdir}/opt
	chmod -R 755 ${pkgdir}/usr


}
